/**
 * @file countChar.c
 * @author your name (you@domain.com)
 * @brief 统计一段字符序列中小写字母出现的次数
 * @version 0.1
 * @date 2022-10-26
 *
 * @copyright Copyright (c) 2022
 *
 */
#include <stdio.h>
#include <string.h>
#include <memory.h>
int main()
{
    char ch;
    int num[26], i;
    memset(num, 0, sizeof(num)); //初始化数组num
    while ((ch = getchar()) != '\n')  //输入字符串，判断统计
        if (ch >= 'a' && ch <= 'z')   //是否为小写字母
            num[ch - 'a']++;
    for (i = 0; i < 26; i++) //输出结果
    {
        if (i % 9 == 0)
            printf("\n");
        printf("%c(%d) ", 'a' + i, num[i]);
    }
    printf("\n");
    return 0;
}
